/**
 * Ingenius-Group S.A.S
 *
 * Project: SAU
 * File: EditFeatureEvent.java
 * Date: 08/02/2011
 */

package com.ingenius.sau.client.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.ingenius.sau.client.event.EditFeatureEvent.EditFeatureEventHandler;

/**
 * Class <strong>EditFeatureEvent</strong>
 * 
 * @author Jesus David
 * @version 0.1
 */
public class EditFeatureEvent extends GwtEvent<EditFeatureEventHandler> {

	public interface EditFeatureEventHandler extends EventHandler {

		void onEditFeature(EditFeatureEvent event);
	}

	public static Type<EditFeatureEventHandler> TYPE = new Type<EditFeatureEventHandler>();

	private final String featureId;

	public EditFeatureEvent(String featureId) {
		this.featureId = featureId;
	}

	public String getFeatureId() {
		return featureId;
	}

	@Override
	public Type<EditFeatureEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(EditFeatureEventHandler handler) {
		handler.onEditFeature(this);
	}

}
